﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Collections;
using TwoWheels.Account;
using TwoWheels.Category;
using System.Data.SqlClient;
using System.Data;

namespace TwoWheels
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                string constr = @"Data Source=DUO-P8600;Initial Catalog=TwoWheels;Integrated Security=True";
                string query = "SELECT KategoriaID, NazwaKategorii FROM Kategoria";

                SqlDataAdapter da = new SqlDataAdapter(query, constr);
                DataTable table = new DataTable();

                da.Fill(table);
                DataList.DataSource = table;
                DataList.DataBind();
            } 
        }
    }
}